package com.ruoyi.purchase.service.impl;

import java.util.List;

import com.ruoyi.purchase.domain.DictData;
import com.ruoyi.purchase.mapper.DictDataMapper;
import com.ruoyi.purchase.service.IDictDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * DictDataService业务层处理
 * 
 * @author kevinness
 * @date 2025-03-05
 */
@Service
public class DictDataService implements IDictDataService
{
    @Autowired
    private DictDataMapper dictDataMapper;

    /**
     * 查询DictData
     * 
     * @param code DictData主键
     * @return DictData
     */
    @Override
    public DictData selectDictDataByCode(String code)
    {
        return dictDataMapper.selectDictDataByCode(code);
    }

    /**
     * 查询DictData列表
     * 
     * @param dictData DictData
     * @return DictData
     */
    @Override
    public List<DictData> selectDictDataList(DictData dictData)
    {
        return dictDataMapper.selectDictDataList(dictData);
    }

    /**
     * 新增DictData
     * 
     * @param dictData DictData
     * @return 结果
     */
    @Override
    public int insertDictData(DictData dictData)
    {
        return dictDataMapper.insertDictData(dictData);
    }

    /**
     * 修改DictData
     * 
     * @param dictData DictData
     * @return 结果
     */
    @Override
    public int updateDictData(DictData dictData)
    {
        return dictDataMapper.updateDictData(dictData);
    }

    /**
     * 批量删除DictData
     * 
     * @param codes 需要删除的DictData主键
     * @return 结果
     */
    @Override
    public int deleteDictDataByCodes(String[] codes)
    {
        return dictDataMapper.deleteDictDataByCodes(codes);
    }

    /**
     * 删除DictData信息
     * 
     * @param code DictData主键
     * @return 结果
     */
    @Override
    public int deleteDictDataByCode(String code)
    {
        return dictDataMapper.deleteDictDataByCode(code);
    }
}
